home *** CD-ROM | disk | FTP | other *** search
- Path: news.mindlink.net!news
- From: genew@mindlink.bc.ca (Gene Wirchenko)
- Newsgroups: comp.lang.c
- Subject: Re: why not add getch() to the std C RTL?
- Date: Sun, 04 Feb 1996 05:47:35 GMT
- Organization: MIND LINK! - British Columbia, Canada
- Message-ID: <4f1hd9$h79@fountain.mindlink.net>
- References: <DM85L8.5Jn@emr1.emr.ca> <bnelsonDM887t.LDI@netcom.com>
- NNTP-Posting-Host: line241.nwm.mindlink.net
- X-Newsreader: Forte Free Agent 1.0.82
-
- bnelson@netcom.com (Bob Nelson) wrote:
-
- >On Sun, 4 Feb 1996 00:05:32 GMT, John Grant wrote:
-
- >> There are *many* people who want to do the following in their C programs:
- >> - read a single unbuffered keystroke (getch() in DOS, ioctl in unix...)
- >
- >> The usual response is "not standard C, o/s-specific" etc.
-
- >I'll just quote the following from "Expert C Programming" by Peter van
- >der Linden (ISBN 0-13-177429-8) and offer no comments of my own, other
- >than some emphasis added. Instead, it'll be interesting to see how
- >participants in comp.lang.c respond to what PvdL thinks (especially in
- >the context of your posting). Here's the paragraph from page 213:
-
- >"People often wonder why ANSI C didn't define a standard function to
- >get a character if a key has been pressed. Without a standard
- >function, every system has a different method and program portability
- >is lost. The argument against providing kbhit() as part of the
- >standard is that *it is mostly useful for GAMES software* and there
- >are many other terminal I/O features that are not standardized. In
- >addition, you don't want to promise a standard library function *that
- >SOME OS's will find difficult to provide.* The argument for providing
- >it is that it is mostly useful for games software and that games
- >writers don't need the myriad of other terminal I/O features that
- >could be standardized. Whichever view you hold, it's true the XJ311
- >missed an opportunity to reinforce C as the language of choice for a
- >generation of programmers writings games on UNIX."
-
- >Comments?
- >
- >--
- >=============================================================================
- > Bob Nelson: Dallas, Texas, U.S.A. - bnelson@netcom.com
- > Linux for fun, M$ for $$$...and the NFL for what really counts!
- >=============================================================================
-
- New, the game that will keep you on the edge of your seat:
-
- "Generating report - press <Escape> to interrupt..."
-
- If Mr. van der Linden plays baseball, it must be in left field,
- far, left field. Disclaimer: "far" is being used in an ordinary
- English sense and not as a non-standard C keyword.
-
- Sincerely,
-
- Gene Wirchenko
-
- C Pronunciation Guide:
- y=x++; "wye equals ex plus plus semicolon"
- x=x++; "ex equals ex doublecross semicolon"
-
-